angular.module('mamApp').controller('homeController', ['$scope', '$state','$log','ImsDialog','paramsManager','ImsAlert','userValidate','homeManager',
 function ($scope, $state,$log,ImsDialog,paramsManager,ImsAlert,userValidate,homeManager) {

  homeManager.programandNum().then(function (result) {
   $scope.albums = result.data.albumVO;
   $scope.programs = result.data.programVO;
   $scope.play = result.data.playVo;
   console.log(result)

  })

   var now = new Date(),
     hour = now.getHours()
    if(hour < 6){$scope.text = "凌晨好！"}
    else if (hour < 9){$scope.text = "早上好，"}
    else if (hour < 12){$scope.text = "上午好，"}
    else if (hour < 14){$scope.text = "中午好，"}
    else if (hour < 17){$scope.text = "下午好，"}
    else if (hour < 19){$scope.text = "傍晚好，"}
    else if (hour < 22){$scope.text = "晚上好，"}
    else {$scope.text = "夜里好，"}

}])
